<include file="Tpl/Public/admin_top.html">
	<script type="text/javascript">
		function add(){
			var tdiv=document.createElement("div");
			tdiv.id="popadd";
			tdiv.className="form-container";
			createBg();
			tdiv.style.cssText="width:300px;height:150px;position:fixed;margin:auto;left:0; right:0; top:0; bottom:0;border:1px solid #e9e9e9;z-index:999";
			tdiv.innerHTML='<form action="__APP__/admin{url}doMenuCnSetAddone{shtml}" method=post target="main">'+
										 '<table width=100%  height="150" cellspacing=0 cellpadding=0>'+
										 '<tr><td  align="right" style="color:#333;font-size:12px"><span style="cursor:pointer" onclick="closeBg(\'popadd\');">关闭</span></td></tr>'+
											'<tr><td style="color:#333;font-size:16px">一级菜单名称</td></tr>'+
											'<tr><td><input type="text" name="oname" style="width:150px"></td></tr>'+
											'<tr><td style="color:#333;font-size:16px">一级菜单链接</td></tr>'+
											'<tr><td><input type="text" name="ourl" style="width:150px"></td></tr>'+
											'<input type="hidden" name="token" value="{token}">'+
											'<tr><td colspan=2><input type="hidden" name="sp2" value="{sp}"><input type="image" src="{site}/Public/images/add.gif"></td></tr>'+
										' </table>'+
										'</form>';
			document.body.appendChild(tdiv);
		}function add_two(oid){
			var tdiv=document.createElement("div");
			tdiv.id="popadd";
			tdiv.className="form-container";
			createBg();
			tdiv.style.cssText="width:300px;height:150px;position:fixed;margin:auto;left:0; right:0; top:0; bottom:0;border:1px solid #e9e9e9;z-index:999";
			tdiv.innerHTML='<form action="__APP__/admin{url}doMenuCnSetAddtwo{shtml}" method=post target="main">'+
										 '<table width=100%  height="150" cellspacing=0 cellpadding=0>'+
										 '<tr><td  align="right" style="color:#333;font-size:12px"><span style="cursor:pointer" onclick="closeBg(\'popadd\');">关闭</span></td></tr>'+
											'<tr><td style="color:#333;font-size:16px">二级菜单名称</td></tr>'+
											'<tr><td><input type="text" name="tname" style="width:150px"></td></tr>'+
											'<tr><td style="color:#333;font-size:16px">二级菜单链接</td></tr>'+
											'<tr><td><input type="text" name="turl" style="width:150px"></td></tr>'+
											'<input type="hidden" name="token" value="{token}">'+
											'<tr><td colspan=2><input type="hidden" name="oid" value="'+oid+'"><input type="hidden" name="sp2" value="{sp}"><input type="image" src="{site}/Public/images/add.gif"></td></tr>'+
										' </table>'+
										'</form>';
			document.body.appendChild(tdiv);
		}
	</script>	
<form action="__APP__/admin{url}doMenuCnSet{shtml}" method=post>
	<table width=98% height="auto" cellspacing=0 cellpadding=0 border=1 style="margin:auto;border:1px solid #ccc">
		<tr>
			<td height="40" colspan="4" style="line-height:40px;background:url('{site}/Public/images/topbg.jpg')"><span style="font-size:16px;text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);color:#333;font-weight:bold;">菜单配置</span></td>
		</tr>
		<tr>
			<td height="30" width="40%" style="line-height:30px;font-size:15px;color:#222;font-weight:bold;">一级菜单列表</td>
			<td height="30" width="40%" style="line-height:30px;font-size:15px;color:#222;font-weight:bold;">二级菜单列表</td>
			<td height="30" width="10%" style="line-height:30px;font-size:15px;color:#222;font-weight:bold;">排序</td>
			<td height="30" width="10%" style="line-height:30px;font-size:15px;color:#222;font-weight:bold;">
				<a style="color:#0066cc;font-size:12px;font-family:Tahoma;"  href="javascript:void(0)" onclick="add()">增加</a>
			</td>
		</tr>
<?php
if(!empty($this->array_two['mc'])){
	foreach($this->array_two['mc'] as $k=>$v){
?>
		<tr onmouseover="addClass(this)" onmouseout="removeClass(this)">
			<td height="30" style="line-height:30px;font-size:12px;color:#555;">
				<input type="text" value="<?php echo $v['title']; ?>" name="<?php echo $k; ?>-title" style="width:30%">
				<input type="text" value="<?php echo $v['url']; ?>" name="<?php echo $k; ?>-url" style="width:55%;margin-left:10px;">
				<a style="color:#0066cc;font-size:12px;font-family:Tahoma;"  href="__APP__/admin{url}doMenuCnSetDelone{url}sp{url}{sp}{url}oid{url}<?php echo $k; ?>{shtml}?token={token}" onclick="return confirm('您确定要删除?');">删除</a>
			</td>
			<td height="30" style="line-height:30px;font-size:12px;color:#555;">
				<?php
				 foreach($v['seclists'] as $kk=>$vv){
				 	?>
				 	<div style="margin-bottom:8px;">
				 		<input type="text" value="<?php echo $vv['title']; ?>" name="<?php echo $k; ?>-<?php echo $kk; ?>-title" style="width:30%">
				 		<input type="text" value="<?php echo $vv['url']; ?>" name="<?php echo $k; ?>-<?php echo $kk; ?>-url" style="width:55%;margin-left:10px;">
				 		<a style="color:#0066cc;font-size:12px;font-family:Tahoma;"  href="__APP__/admin{url}doMenuCnSetDeltwo{url}sp{url}{sp}{url}oid{url}<?php echo $k; ?>{url}tid{url}<?php echo $kk; ?>{shtml}?token={token}" onclick="return confirm('您确定要删除?');">删除</a>
				 	</div>
				<?php
				}
				?>
			</td>
			<td height="30" style="line-height:30px;font-size:12px;color:#555;">
				<input type="text" value="<?php echo $v['ord']; ?>" name="<?php echo $k; ?>-ord">
			</td>
			<td height="30" style="line-height:30px;font-size:12px;color:#555;">
				<a style="color:#0066cc;font-size:12px;font-family:Tahoma;"  href="javascript:void(0)" onclick="add_two(<?php echo $k; ?>)">增加</a>&nbsp;
			</td>
		</tr>
<?php
	}
}
?>
<input type="hidden" name="sp" value="{sp}">
<input type="hidden" name="token" value="{token}">
		<tr><td colspan=4><input type="image" src="{site}/Public/images/edit.gif"></td></tr>
	</table>
</form>
<include file="Tpl/Public/admin_bottom.html">